Skip to content

api: add per-core table offsets for Phoenix (0x4C0008) - #417

Open
plastininikolay wants to merge 1 commit into
FlyGoat:masterfrom
plastininikolay:phoenix-core-table-offsets
Open

plastininikolay wants to merge 1 commit into
FlyGoat:masterfrom
plastininikolay:phoenix-core-table-offsets

Conversation

@plastininikolay

Copy link
Copy Markdown

get_core_power, get_core_volt, get_core_temp and get_core_clk return NaN on Phoenix. This adds the per-core offsets for PM table 0x4C0008. The layout matches Rembrandt (0x00400004): 8 floats per array, power at 0x7F4, voltage 0x814, temperature 0x834, clock 0x894.

For reference, the next arrays in the same block look like effective clock (0x8B4), C0 residency % (0x8D4) and CC6 % (0x8F4). I did not add those.

Tested on a Ryzen 9 7940HS (ASUS ROG Flow X13 GV302XV, Fedora 44, ryzen_smu) with a small program against libryzenadj, while taskset -c 2 pinned a busy loop to core 2:

table 0x004c0008
core 0: P=3.24 W  V=1.095 V  T=59.2 C  f=4.70 GHz   (another process was busy here)
core 1: P=0.02 W  V=0.677 V  T=53.0 C  f=1.88 GHz
core 2: P=3.52 W  V=1.088 V  T=66.2 C  f=4.70 GHz   (loaded)
core 3: P=0.04 W  V=0.677 V  T=53.0 C  f=1.88 GHz
...
core 8: P=nan W  V=nan V  T=nan C  f=nan GHz
cpufreq cpu2: 4690 MHz

Only 0x4C0008 is covered, because it is the only table version I can test.

I used AI assistance (Claude) to find the offsets and write the patch, and checked the results on my laptop.

get_core_power, get_core_volt, get_core_temp and get_core_clk returned
NaN on Phoenix. The per-core arrays in PM table 0x4C0008 are laid out
like on Rembrandt (0x00400004): power at 0x7F4, then voltage, temperature
and clock at +0x20, +0x40 and +0xA0, with 8 entries each.

Tested on a Ryzen 9 7940HS (ASUS ROG Flow X13 GV302XV) with a
single-core load pinned by taskset: the loaded core reports 4.70 GHz,
matching cpufreq (4690 MHz), with power, voltage and temperature rising
only on that core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant